import React from 'react'
import ReactDOM from 'react-dom/client'
import { HashRouter } from "react-router-dom";
import App from './App.tsx'
import { App as AntApp, ConfigProvider } from 'antd'
import './index.less'

// 自定义主题配置
const theme = {
  token: {
    colorPrimary: '#FF4000',
    colorSuccess: '#52c41a',
    colorWarning: '#faad14',
    colorError: '#ff4d4f',
    colorInfo: '#FF4000',
    colorLink: '#FF4000',
    colorLinkHover: '#ff6b33',
    colorLinkActive: '#e63900',
  },
  components: {
    Button: {
      colorPrimary: '#FF4000',
      colorPrimaryHover: '#ff6b33',
      colorPrimaryActive: '#e63900',
    },
    Menu: {
      colorPrimary: '#FF4000',
      itemSelectedBg: '#fff2f0',
      itemSelectedColor: '#FF4000',
      itemHoverBg: '#fff7f5',
      itemHoverColor: '#FF4000',
    },
    Layout: {
      headerBg: '#FF4000',
      siderBg: '#fff',
    },
    Card: {
      colorBorderSecondary: '#f0f0f0',
    },
    Table: {
      headerBg: '#fafafa',
      headerColor: '#262626',
    },
    Steps: {
      colorPrimary: '#FF4000',
      colorPrimaryBorder: '#FF4000',
    },
    Alert: {
      colorInfoBorder: '#FF4000',
      colorInfoBg: '#fff2f0',
    },
  },
};

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <HashRouter>
      <ConfigProvider theme={theme}>
        <AntApp>
          <App />
        </AntApp>
      </ConfigProvider>
    </HashRouter>
  </React.StrictMode>,
)
